package ar.com.digitalbricks.core.dao.impl;

import java.util.Collection;

import ar.com.digitalbricks.core.MenuItem;
import ar.com.digitalbricks.core.TipoMenuItem;
import ar.com.digitalbricks.core.dao.MenuItemDAO;
import ar.com.digitalbricks.core.impl.MenuItemImpl;
import ar.com.digitalbricks.fwk.impl.EntityDAOAbstract;

public class MenuItemDAOImpl extends EntityDAOAbstract<MenuItem> implements MenuItemDAO {

	@Override
	protected Class<MenuItemImpl> getClassMapped() {
		return MenuItemImpl.class;
	}

	@SuppressWarnings("unchecked")
	@Override
	public Collection<MenuItem> findByTipoMenuItem(TipoMenuItem tipoMenuItem) {
		return this.generateQuery("tipoMenuItem.id = " + tipoMenuItem.getId()).list();
	}
	
}